-
Notifications
You must be signed in to change notification settings - Fork 11.8k
fix: Quote chaining in E2EE room not limiting quote depth #36143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 96cedb1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #36143 +/- ##
===========================================
- Coverage 64.54% 63.60% -0.94%
===========================================
Files 3129 3045 -84
Lines 98410 97063 -1347
Branches 18659 18540 -119
===========================================
- Hits 63514 61738 -1776
- Misses 32073 32594 +521
+ Partials 2823 2731 -92
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
apps/meteor/client/components/message/toolbar/items/actions/QuoteMessageAction.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Tasso Evangelista <[email protected]>
Proposed changes (including videos or screenshots)
This issue occurs because we only enforce the quote chaining limit on the server, but the server cannot evaluate the message or its content due to the message being encrypted.
Due to this constraint, the limit can only be applied client-side before the message is
sentdecrypted, and that is what was done. This also improves UX since previously the quote preview did not evaluate the chain limit, causing a mismatch between what showed in the preview and what was actually experienced once the message was sent*.Caveats:
through the APIthat exceed said limit. There's no way around this. UPDATE: Quote attachments are based on message permalinks. We cannot prevent sending deeply nested quotes. Instead, we prune quotes that exceed the depth limit at decryption time.no limit to quotes was applied to the message layout, as to not break expected behavior. This means that encrypted messages sent through the APIs can display quote chains bigger thant the limit (see previous caveat).UPDATE: See caveat update above. Layout modifications were applied solely to e2ee messages.Update:
Unfortunately the mechanism for sending e2ee messages with quotes was misinterpreted, so some of what was said above is not true. Attachments for e2ee messages are processed at the time of decryption, and there's no control of the depth of quote chaining at the time of sending it. For this reason, for e2ee messages only, the limit was applied during the decryption step, which changes the rendered content when the setting changes.
Some of the caveats
Issue(s)
SUP-782
Steps to test or reproduce
Further comments
It's not clear whether the message layout should also respect the limit, but historically it has not, so no attempt was or will made to change the message layout at this point. If this changes at any point, a new PR is warranted.